package com.google.code.netbuilder.dal.entities;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;

@XmlType(propOrder = {"equipmentId", "fieldName", "value", "version"}, 
                         name = "EquipmentVersion")
@XmlAccessorType(XmlAccessType.FIELD)
@Entity
@Table(name = "equipment_version")
@SequenceGenerator(name="seq", initialValue=1, allocationSize=100)
public class EquipmentVersion {

        @Id
        @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "seq")
        Integer id;
        @Column(name="equipment_id")
	Integer equipmentId;
        @Column(name="field_name")
	String fieldName;
	String value;
	Integer version;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Integer getEquipmentId() {
		return equipmentId;
	}

	public void setEquipmentId(Integer equipmentId) {
		this.equipmentId = equipmentId;
	}

	public String getFieldName() {
		return fieldName;
	}

	public void setFieldName(String fieldName) {
		this.fieldName = fieldName;
	}

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}

	public Integer getVersion() {
		return version;
	}

	public void setVersion(Integer version) {
		this.version = version;
	}

}
